[#ftl]
[#include "../util10.ftl"/]

[#global dojoRequiredClasses = ""/]
[#global definedWigdets][/#global]

[#macro keyword word]
	[#--if word != "agile.Application" && word != "agile.MessageDialog"--]	
		[#if !ShrinksafeKeyWords?contains(word + ";")]
		[#global ShrinksafeKeyWords = ShrinksafeKeyWords + word + ";"/]
		[/#if]
    [#--/#if--]
[/#macro]
[#macro method word]
	[@keyword word/]
	[#--if !ShrinksafeMethodKeyWords?contains(word + ";")]
	[#global ShrinksafeMethodKeyWords = ShrinksafeMethodKeyWords + word + ";" /]
	[/#if--]
[/#macro]
[#macro defineStyle]
	[#local rules][#nested][/#local]
	[#list rules?split("}") as rule]
		[#if rule?trim?length > 0]
		agile.addCssRule("${rule?replace("\"","'")?replace("\t|\r|\n","","r")?trim}}");
		[/#if]
	[/#list]	
[/#macro]

[#macro requireStyle]
	[@defineStyle][#nested][/@]
[/#macro]


[#--macro require class]
  dojo.require("${class}");
[/#macro--]

[#macro loadDojoClasses]
	[#list dojoRequiredClasses?split(",") as class]
	dojo.require("${class}");
	[/#list]
[/#macro]

[#macro dojoConnect event args=""]
	<script type="dojo/connect" event="${event}" [#if args !=""]args="${args}"[/#if]>
	[#nested]
	</script>
[/#macro]


[#macro extend widgetClass]
[#local index=widgetClass?last_index_of("/") + 1/]
[@bootstrapChains "Step2/3 Initializing ${widgetClass?substring(index)}"]
require({async:false},["${widgetClass}"],function(widget){lang.extend(widget,{[#nested]});});
[/@]
[/#macro]

[#macro mixin object]
 lang.mixin(${object},{
	 [#nested]
 });
[/#macro] 

[#global iconWigdets][/#global]

[#macro defineIcon iconClass widgetClass]
   	[#global iconWigdets = iconWigdets +";" + iconClass/]
   	[@define iconClass "_WidgetIcon" "_WidgetIcon=agile._WidgetIcon"][#nested][/@]
   	[#--include widgetClass?replace(".","/")?trim +".ftl"/--]
[/#macro]

[#macro copyright]
Copyright &copy; 2018 Beyond Prototype. All rights reserved. 
<div> Build version at ${.now?string("yyyy-MM-dd")}</div>
[#--<center>
Disclaimer: Beyond Prototype makes no representations or warranties with respect to the contents or use of this website. 
Further,Beyond Prototype reserves the right to revise this website and to make changes in its contents at any time, without obligation to notify any person or entity of such revisions or changes.
</center> --]
[/#macro]

 [#macro support]
 <div>Contact us at <span style='color:blue;font-style:italic'> beyondprototype@126.com</span></div>
 [/#macro]
